import React from 'react';
import ReactDOM from 'react-dom';

import { HashRouter } from 'react-router-dom';

// 载入默认全局样式 normalize 、.clearfix 和一些 mixin 方法等
import '@icedesign/base/reset.scss';

import router from './router';
import {
  Provider
} from 'react-redux';
import configureStore from './store';
let store = configureStore();

const ICE_CONTAINER = document.getElementById('ice-container');

if (!ICE_CONTAINER) {
  throw new Error('当前页面不存在 <div id="ice-container"></div> 节点.');
}

ReactDOM.render(
  <Provider store={store}><HashRouter>{router()}</HashRouter></Provider>,

  ICE_CONTAINER
);
